import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';


//索赔结算发票审核

//主页面查询
export const getListByPage = params => axios.post(`${SERVER.CLAIMFAC}/rpBatch/getListByPage`,  params );

//导出
export const getListForExport = (params) => axios.post(`${SERVER.CLAIMFAC}/rpBatch/getListForExport`, params, {
  responseType: 'blob'
});

//下载中心导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);

//审核
export const approve = params => axios.post(`${SERVER.CLAIMFAC}/rpBatch/approveByPtId`,  params );
//索赔明细报表
export const qryClaimById = (params) => axios.get(`${SERVER.CLAIMFAC}/rpBatch/qryClaimById/${params.id}`);




//技术升级列表
export const selectBySettleIds = (params) => axios.get(`${SERVER.CLAIMFAC}/rpBatch/selectBySettleIds/${params.id}`);






export const selectFilesBySettleIds = (params) => axios.get(`${SERVER.CLAIMFAC}/rPAssess/selectFilesBySettleIds/${params.id}`);


//
//
//
// export const getListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/getListByPage`, params);
// //通过考核单号取得索赔单和结算单信息
// export const SelectAssesBySettleIds = (id, params) => axios.get(`${SERVER.CLAIMDEALER}/rPAssess/selectBySettleIds/${id}`, { params });
// export const SelectClaimBySettleIds = (id, params) => axios.get(`${SERVER.CLAIMDEALER}/rPCmsClaim/selectBySettleIds/${id}`, { params });
// //新增的保存
// export const newSave = params => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/saveOne`,  params );
// //主页面的单条删除
// export const deleteOne = (id, params) => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/updateStatusById/${id}`,{params} );
//审核回显
 export const quyrpBatch = (id, params) => axios.get(`${SERVER.CLAIMFAC}/rpBatch/selectById/${id}`, { params });
//
//
// //编辑的保存
// export const editSave = params => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/updateByPtId`,  params );
//
// //提交
// export const submitById = params => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/updateStatus`,  params );
//
//
// //添加发票最大金额和税率获取
// //获取配件
// // export const getInvoiceInfo = params =>
// //   axios.get(`${SERVER.CLAIMFAC}/const/getInvoiceInfo`, {
// //     params
// //   });
// export const getInvoiceInfo = (params) => axios.get(`${SERVER.CLAIMDEALER}/const/getInvoiceInfo`, {params});
// //导出
// export const getListForExport = (params) => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/getListForExport`, params, {
//   responseType: 'blob'
// });
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// //索赔费用调整-主机厂
// //索赔类型取得
// export const getclaimType = (params) => axios.get(`${SERVER.CLAIMFAC}/const/getBaseDataByType`, { params });
//
// //修改回显
// export const quyrPCmsClaim = (id, params) => axios.get(`${SERVER.CLAIMFAC}/rPCmsClaim/selectById/${id}`, { params });
//
//
//
// //编辑的保存
// export const editSave = params => axios.post(`${SERVER.CLAIMFAC}/rPCmsClaim/updateByPtId`,  params );
// //审核记录
// export const getShList = params => axios.post(`${SERVER.CLAIMFAC}/rPCmsClaimLog/getListByPage`,  params );
// //维修历史
// export const getRoLogList = params => axios.get(`${SERVER.CLAIMFAC}/const/getRoLogList`,  {params} );
// //索赔历史
// export const getSpList = params => axios.post(`${SERVER.CLAIMFAC}/rPCmsClaim/getListByPage`,  params );
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// //新增的保存
// export const newSave = params => axios.post(`${SERVER.CLAIMFAC}/rPCmsClaim/saveOne`,  params );
// //批量启动
// export const piliangqiyong = data => axios.post(`${SERVER.CLAIMFAC}/rPCheckReason/updateEnableByIds`,  null ,{params : data} );
// //批量停用
// export const piliangtingyong = data => axios.post(`${SERVER.CLAIMFAC}/rPCheckReason/updateEnableByIds`,  null ,{params : data} );
//
//
//
// //通过ID查
// export const quySP = params => axios.get(`${SERVER.CLAIMFAC}/rPCmsClaim/selectById/${params.id}`);
//
// //导出模版
// export const downloadModel = params => {
//   const url = `${SERVER.CLAIMFAC}/rPCheckReason/exportModel`;
//   return axios({
//     url,
//     method: 'post',
//     responseType: 'blob'
//   });
// };
//
//
//
//
//
